package cn.sumpu.app.guoguojie.dao;

import java.util.List;
import java.util.Map;

import cn.sumpu.app.guoguojie.domain.Comment;
import cn.sumpu.app.guoguojie.domain.Family;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;

public interface FamilyDao {
	public void insert(Family family) throws AppBusinessException;
	
	public List<Family> getFamilyList(Map<String,Object> map)throws AppBusinessException;
	
	public void updateFamily(Family family)throws AppBusinessException;
	
	//通过会员编号查询得到家的信息
	public Family getFamilyByMember(String member)throws AppBusinessException;
	
	//更改家庭积分
	void updateFamilyIntegral(Map<String, Object> map)throws AppBusinessException;
	
	//根据连续登录天数加分
	void updateFamilyByLogin(Map<String, Object> map)throws AppBusinessException;
	
	//根据门牌号取得这家最近的两条微博(不是同一天发的)
	List<String> getDoingTwoDay(String doorplate)throws AppBusinessException;
	
	//根据门牌号取得这家最近的两篇日志(不是同一天发的)
	List<String> getBlogTwoDay(String doorplate)throws AppBusinessException;
	
	//根据门牌号取得这家今天发表了多少条微博（包括对别人微博的评论）
	int getDoingCommentCount(String doorplate)throws AppBusinessException;
	//根据门牌号取得这家今天发表了多少篇日志（包括对别人日志的评论）
	int getBlogCommentCount(String doorplate)throws AppBusinessException;
	
	//根据门牌号取得今天这家添加了几个邻居
	int getAddFriendCount(String doorplate)throws AppBusinessException;
	//根据门牌号取得今天这家同意了几个邻居的邀请
	int getAgreeFriendCount(String doorplate)throws AppBusinessException;
	
	//根据门牌号取得这家今天微博的最高评论量
	Comment getDoingTopCommentCount(String doorplate)throws AppBusinessException;
	//根据门牌号取得这家今天日志的最高评论量
	Comment getBlogTopCommentCount(String doorplate)throws AppBusinessException;
	
	public List<Family> getLoveFamilyList(Map<String, Object> map)throws AppBusinessException;//查询有爱心奖章的家庭
	
	public int getLoveFamilyListCount(Map<String, Object> map)throws AppBusinessException;//查询有爱心奖章的家庭数量
	
	public List<String> getAllFamilyId()throws AppBusinessException;//查询所有的家庭号
}
